/*
using MyGeneration/Template/NHibernate (c) by Sharp 1.4
based on OHM (alvy77@hotmail.com)
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace Model
{

	[Serializable]
	public class Users 
	{
		#region Member Variables

		protected string _id;
		protected string _name;
		protected string _password;
		protected string _nickname;
		protected string _storeid;
		protected string _appkey;
		protected string _appsecret;
		protected string _seesionkey;
		protected string _phone;
		protected string _tel;
		protected string _qq;
		protected string _wangwang;
		protected string _email;
		protected string _card;
		protected string _address;
		protected string _marriage;
		protected int? _gradeid;
		protected int? _roleid;
        protected DateTime? _createdate;
		protected bool _bIsDeleted;
		protected bool _bIsChanged;
		#endregion
		
		
		#region Public Properties
		
		public virtual string Id
		{
			get { return _id; }
			set 
			{
			  if (value != null && value.Length > 36)
			    throw new ArgumentOutOfRangeException("Id", "Id value, cannot contain more than 36 characters");
			  _bIsChanged |= (_id != value); 
			  _id = value; 
			}
			
		}
		
		public virtual string Name
		{
			get { return _name; }
			set 
			{
			  if (value != null && value.Length > 50)
			    throw new ArgumentOutOfRangeException("Name", "Name value, cannot contain more than 50 characters");
			  _bIsChanged |= (_name != value); 
			  _name = value; 
			}
			
		}
		
		public virtual string Password
		{
			get { return _password; }
			set 
			{
			  if (value != null && value.Length > 100)
			    throw new ArgumentOutOfRangeException("Password", "Password value, cannot contain more than 100 characters");
			  _bIsChanged |= (_password != value); 
			  _password = value; 
			}
			
		}
		
		public virtual string NickName
		{
			get { return _nickname; }
			set 
			{
			  if (value != null && value.Length > 50)
			    throw new ArgumentOutOfRangeException("NickName", "NickName value, cannot contain more than 50 characters");
			  _bIsChanged |= (_nickname != value); 
			  _nickname = value; 
			}
			
		}
		
		public virtual string StoreId
		{
			get { return _storeid; }
			set 
			{
			  if (value != null && value.Length > 50)
			    throw new ArgumentOutOfRangeException("StoreId", "StoreId value, cannot contain more than 50 characters");
			  _bIsChanged |= (_storeid != value); 
			  _storeid = value; 
			}
			
		}
		
		public virtual string AppKey
		{
			get { return _appkey; }
			set 
			{
			  if (value != null && value.Length > 100)
			    throw new ArgumentOutOfRangeException("AppKey", "AppKey value, cannot contain more than 100 characters");
			  _bIsChanged |= (_appkey != value); 
			  _appkey = value; 
			}
			
		}
		
		public virtual string AppSecret
		{
			get { return _appsecret; }
			set 
			{
			  if (value != null && value.Length > 100)
			    throw new ArgumentOutOfRangeException("AppSecret", "AppSecret value, cannot contain more than 100 characters");
			  _bIsChanged |= (_appsecret != value); 
			  _appsecret = value; 
			}
			
		}
		
		public virtual string SeesionKey
		{
			get { return _seesionkey; }
			set 
			{
			  if (value != null && value.Length > 100)
			    throw new ArgumentOutOfRangeException("SeesionKey", "SeesionKey value, cannot contain more than 100 characters");
			  _bIsChanged |= (_seesionkey != value); 
			  _seesionkey = value; 
			}
			
		}
		
		public virtual string Phone
		{
			get { return _phone; }
			set 
			{
			  if (value != null && value.Length > 50)
			    throw new ArgumentOutOfRangeException("Phone", "Phone value, cannot contain more than 50 characters");
			  _bIsChanged |= (_phone != value); 
			  _phone = value; 
			}
			
		}
		
		public virtual string Tel
		{
			get { return _tel; }
			set 
			{
			  if (value != null && value.Length > 50)
			    throw new ArgumentOutOfRangeException("Tel", "Tel value, cannot contain more than 50 characters");
			  _bIsChanged |= (_tel != value); 
			  _tel = value; 
			}
			
		}
		
		public virtual string Qq
		{
			get { return _qq; }
			set 
			{
			  if (value != null && value.Length > 50)
			    throw new ArgumentOutOfRangeException("Qq", "Qq value, cannot contain more than 50 characters");
			  _bIsChanged |= (_qq != value); 
			  _qq = value; 
			}
			
		}
		
		public virtual string WangWang
		{
			get { return _wangwang; }
			set 
			{
			  if (value != null && value.Length > 50)
			    throw new ArgumentOutOfRangeException("WangWang", "WangWang value, cannot contain more than 50 characters");
			  _bIsChanged |= (_wangwang != value); 
			  _wangwang = value; 
			}
			
		}
		
		public virtual string Email
		{
			get { return _email; }
			set 
			{
			  if (value != null && value.Length > 50)
			    throw new ArgumentOutOfRangeException("Email", "Email value, cannot contain more than 50 characters");
			  _bIsChanged |= (_email != value); 
			  _email = value; 
			}
			
		}
		
		public virtual string Card
		{
			get { return _card; }
			set 
			{
			  if (value != null && value.Length > 100)
			    throw new ArgumentOutOfRangeException("Card", "Card value, cannot contain more than 100 characters");
			  _bIsChanged |= (_card != value); 
			  _card = value; 
			}
			
		}
		
		public virtual string Address
		{
			get { return _address; }
			set 
			{
			  if (value != null && value.Length > 100)
			    throw new ArgumentOutOfRangeException("Address", "Address value, cannot contain more than 100 characters");
			  _bIsChanged |= (_address != value); 
			  _address = value; 
			}
			
		}
		
		public virtual string Marriage
		{
			get { return _marriage; }
			set 
			{
			  if (value != null && value.Length > 50)
			    throw new ArgumentOutOfRangeException("Marriage", "Marriage value, cannot contain more than 50 characters");
			  _bIsChanged |= (_marriage != value); 
			  _marriage = value; 
			}
			
		}
		
		public virtual int? GradeId
		{
			get { return _gradeid; }
			set { _bIsChanged |= (_gradeid != value); _gradeid = value; }
			
		}
		
		public virtual int? RoleId
		{
			get { return _roleid; }
			set { _bIsChanged |= (_roleid != value); _roleid = value; }
			
		}

        public virtual DateTime? CreateDate
		{
			get { return _createdate; }
			set { _bIsChanged |= (_createdate != value); _createdate = value; }
			
		}
		

		public virtual bool IsDeleted
		{
			get
			{
				return _bIsDeleted;
			}
			set
			{
				_bIsDeleted = value;
			}
		}

        public virtual bool IsChanged
		{
			get
			{
				return _bIsChanged;
			}
			set
			{
				_bIsChanged = value;
			}
		}
		
		#endregion 
		
	}
	
}
